<template>
	<div>
		<!--普通门 -->
		<el-row v-if="normalStatus">
			<el-col :span="3" class="bg first_line_block">
				<div style="height:100px">
					<template v-if="doorStatus.statusZ == 0" class="first_line_image">
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/kaimendaowei-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/kaimendaowei-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/kaimendaowei.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/kaimendaowei.png" />
						</template>
					</template>

					<template v-if="doorStatus.statusZ == 1">
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/guanbidaowei-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/guanbidaowei-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/guanbidaowei.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/guanbidaowei.png" />
						</template>
					</template>

					<template v-if="doorStatus.statusZ == 2">
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/guanbisuojin-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/guanbisuojin-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/guanbisuojin.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/guanbisuojin.png" />
						</template>
					</template>

					<template v-if="doorStatus.statusZ == 3">
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/shoudong-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/shoudong-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/shoudong.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/shoudong.png" />
						</template>
					</template>

					<div v-if="doorStatus.statusZ == 4">
						<!--最高等级的下标是LCB隔离 -->
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/LCB-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/LCB-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/LCB.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/LCB.png" />
						</template>
					</div>

					<div v-if="doorStatus.statusZ == 5">
						<!--最高等级的下标是关门过程中 -->
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/guanmenguocheng-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/guanmenguocheng-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/guanmenguocheng.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/guanmenguocheng.png" />
						</template>
					</div>

					<div v-if="doorStatus.statusZ == 6">
						<!--最高等级的下标是开门过程中 -->
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/kaimenguocheng-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/kaimenguocheng-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/kaimenguocheng.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/kaimenguocheng.png" />
						</template>
					</div>

					<div v-if="doorStatus.statusZ == 7">
						<!--最高等级的下标是开门过程中 -->
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/kmyz-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/kmyz-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/kmyz.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/kmyz.png" />
						</template>
					</div>

					<div v-if="doorStatus.statusZ == 8">
						<!--最高等级的下标是开门过程中 -->
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/gmyz-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/gmyz-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/gmyz.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/gmyz.png" />
						</template>
					</div>

					<template v-if="doorStatus.statusZ == null" class="first_line_image">
						<template v-if="doorType == 3">
							<template v-if="doorStatus.lCB6MarshallInfo == 1">
								<img src="@/assets/img/add1/guanbidaowei1-L.png" />
							</template>
							<template v-else-if="doorStatus.lCB8MarshallInfo == 1">
								<img src="@/assets/img/add1/guanbidaowei1-R.png" />
							</template>
							<template v-else>
								<img src="@/assets/img/guanbidaowei1.png" />
							</template>
						</template>
						<template v-else>
							<img src="@/assets/img/guanbidaowei1.png" />
						</template>
					</template>

				</div>
				<el-form  :model="dataForm" @keyup.enter.native="init()" inline label-position="right" label-width="90px" class="first_line_form">
					<el-form-item label="站台侧：">
						<el-select v-model="dataForm.stationSide" size="mini" placeholder="请选择站台侧" @change="changeStation" class="select_style">
							<el-option v-for="item in options" :key="item.value" :label="item.label"
								:value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="DCU编号：">
						<el-select v-model="dataForm.DCU" placeholder="请选择DCU编号" @change="changeDCU()" size="mini" class="select_style">
							<el-option v-for="(item, index) in DCUoptions" :key="index" :label="item.dcu"
								:value="item.dcu"></el-option>
						</el-select>
					</el-form-item>
					
				</el-form>
			</el-col>
			<el-col :span="21" class="first_line_block">
				<div class="first_line_block_righttop">
					<div class="bg first_line_block_1">
						<div class="title_common">门机工作状态</div>
						<div class="LCBContentul">
							<ul style="width: 90%;" class="first_line_block_1_ul">
							<li :class="[
								item.status === 1?'PSCShow':'',
							]" v-for="(item, index) in doorSList">
								{{ item.name }}
							</li>
						</ul>
						</div>
					</div>
					<div class="bg first_line_block_2">
						<div class="title_common">接收到PSC操作命令信息</div>
						<div class="LCBContentul">
							<ul style="width: 90%;" class="first_line_block_2_ul">
								<li v-for="(item, index) in pscCmdInfo" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']" >
									{{ item.name == 'placeholder'?'':item.name }}
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="first_line_block_rightbtm">
					<div class="bg first_line_block_3">
						<div class="title_common">LCB操作信息</div>
						<div class="LCBContentul">
							<ul style="width: 90%;margin-left:17%;" class="first_line_block_3_ul">
								<li v-for="(item, index) in LCBList" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']">
									{{ item.name == 'placeholder'?'':item.name }}
								</li>
							</ul>
						</div>
					</div>
					<div class="bg first_line_block_4">
						<div class="title_common">DCU工作模式</div>
						<div class="LCBContentul">
							<ul style="width: 90%;margin-left:17%;" class="first_line_block_4_ul">
								<li v-for="(item, index) in DCUWorkMode" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']">
									{{ item.name == 'placeholder'?'':item.name }}
								</li>
							</ul>
						</div>
					</div>
					<div class="bg first_line_block_5">
						<div class="title_common">编组信息</div>
						<div class="LCBContentul">
							<ul style="width: 70%;margin-left:10%" class="first_line_block_5_ul">
								<li v-for="(item, index) in GroupInfo" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']">
									{{ item.name == 'placeholder'?'':item.name }}
								</li>
							</ul>
						</div>
					</div>
				</div>
				
			</el-col>
		</el-row>
		<!-- 端门 -->
		<div class="bg duanmenBg" v-if="duanmenStatus" style="display: block">
			<el-col :span="24" class="duanmenBg1">
				<el-form :inline="true" :model="dataForm" @keyup.enter.native="init()">
					<el-form-item label="站点名称：">
						<span>{{ dataForm.stationName }}</span>
					</el-form-item>
					<el-form-item label="端门编号：">
						<el-select v-model="dataForm.DCU" filterable clearable placeholder="请选择" @change="changedm()">
							<el-option v-for="item in dmOptions" :key="item.dcu" :label="item.dcu" :value="item.dcu">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="站台侧">
						<el-select v-model="dataForm.stationSide" filterable clearable placeholder="请选择"
							@change="changeStation">
							<el-option v-for="item in options" :key="item.value" :label="item.label"
								:value="item.value"></el-option>
						</el-select>
					</el-form-item>
				</el-form>
			</el-col>
			<el-col :span="5" class="duanmenBg1" style="margin-top: 10px">
				<div class="duanmenCon">
					<div class="duanmenCon1" style="width: auto;">端门打开超时报警</div>
					<!-- <span class="yjTxt">左</span> -->
					<div v-if="dmStatus == 1" class="duanmenCon2 red">断开</div>
					<div v-if="dmStatus == 0" class="duanmenCon2 green">闭合</div>
					<div v-if="dmStatus == -1" class="duanmenCon2">断开</div>
				</div>
			</el-col>
			<el-col :span="5" class="duanmenBg1" style="margin-top: 10px">
				<div class="duanmenCon">
					<div class="duanmenCon1">端门状态</div>
					<div class="duanmenCon2" :class="dm1 == 0 ? 'green' : dm1 == 1 ? 'red' : ''">
						<span v-if="dm1 == 1" >未锁闭</span>
						<span v-if="dm1 == 0">锁闭</span>
						<span v-if="dm1 == -1">未锁闭</span>
					</div>
				</div>
			</el-col>
		</div>
		<!-- 应急门 -->
		<div class="bg duanmenBg" v-if="yjStatus" style="display: block">
			<el-row>
				<el-col :span="24" class="duanmenBg1">
					<el-form :inline="true" :model="dataForm" @keyup.enter.native="init()">
						<el-form-item label="站点名称：">
							<span>{{ dataForm.stationName }}</span>
							<!-- <el-input v-model="dataForm.stationName" placeholder="站点名称" clearable></el-input> -->
						</el-form-item>
						<el-form-item label="应急门编号：">
							<el-select v-model="dataForm.DCU" filterable clearable placeholder="请选择应急门编号"
								@change="changeyjDCU()">
								<el-option v-for="item in yjOptions" :key="item.dcu" :label="item.dcu"
									:value="item.dcu"></el-option>
							</el-select>
						</el-form-item>
						<el-form-item label="站台侧">
							<el-select v-model="dataForm.stationSide" filterable clearable placeholder="请选择"
								@change="changeStation">
								<el-option v-for="item in options" :key="item.value" :label="item.label"
									:value="item.value"></el-option>
							</el-select>
						</el-form-item>
					</el-form>
				</el-col>
			</el-row>
			<el-row style="margin-top: 10px">
				<el-col :span="8" class="duanmenBg1">
					<div class="duanmenCon">
						<div class="duanmenCon1">行程开关</div>
						<span class="yjTxt">左</span>
						<div v-if="yjKGStatus == 0" class="duanmenCon2 green">闭合</div>
						<div v-if="yjKGStatus == 1" class="duanmenCon2 red">断开</div>
						<div v-if="yjKGStatus == -1" class="duanmenCon2">断开</div>
						<span class="yjTxt">右</span>
						<div v-if="yjKGStatus1 == 0" class="duanmenCon2 duanmenCon21 green">
							闭合
						</div>
						<div v-if="yjKGStatus1 == 1"  class="duanmenCon2 red">断开</div>
						<div v-if="yjKGStatus1 == -1" class="duanmenCon2">断开</div>
					</div>
				</el-col>
				<el-col :span="8" class="duanmenBg1" style="margin-right: 0">
					<div class="duanmenCon">
						<span class="yjTxt">应急门旁路状态</span>
						<div v-if="yjmplStatus == 0" class="duanmenCon2 green">
							正常
						</div>
						<div v-else class="duanmenCon2">
							旁路
						</div>
					</div>
				</el-col>
			</el-row>
		</div>
		<el-row class="bg" v-if="normalStatus" style="margin-top:10px;margin-bottom: 10px;">
			<div class="title_common">传感器状态</div>
			<el-col :span="6" class="second_line_block">
				<div class="bg2 second_line_block_1">
					<div class="title_common">开关门到位检测</div>
					<div class="LCBContentul">
						<ul style="width: 30%;" class="second_line_block_1_ul">
							<li v-for="(item, index) in DoorTest" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']">
								{{ item.name == 'placeholder'?'':item.name  }}
							</li>
						</ul>
					</div>
				</div>
			</el-col>
			<el-col :span="12" class="second_line_block">
				<div class="bg2 second_line_block_2">
					<div class="title_common">电磁锁</div>
					<div class="LCBContentul">
						<ul style="width: 90%" class="second_line_block_2_ul">
							<li v-for="(item, index) in ElectromagneticLock" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']">
								{{ item.name == 'placeholder'?'':item.name}}
							</li>
						</ul>
					</div>
				</div>
			</el-col>
			<el-col :span="6" class="second_line_block">
				<div class="bg2 second_line_block_3">
					<div class="title_common">应急门</div>
					<div class="LCBContentul">
						<ul style="width: 90%;margin-left:10%" class="second_line_block_3_ul">
							<li v-for="(item, index) in yjDoorInfo" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'PSCShow':'']">
								{{ item.name == 'placeholder'?'':item.name}}
							</li>
						</ul>
					</div>
				</div>
			</el-col>
		</el-row>
		<el-row class="bg" v-if="normalStatus" style="margin-top:10px;margin-bottom: 10px;">
			<div class="title_common">门机故障信息</div>
			<el-col :span="4" class="fourth_line_block">
				<div class="bg2 fourth_line_block_1">
					<div class="title_common">通信故障</div>
					<div class="LCBContentul">
						<ul style="width: 50%;" class="fourth_line_block_1_ul">
							<li v-for="(item, index) in txList" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'GZactive':'']">
								{{ item.name == 'placeholder'?'':item.name }}
							</li>
						</ul>
					</div>
				</div>
			</el-col>
			<el-col :span="10" class="fourth_line_block">
				<div class="bg2 fourth_line_block_2">
					<div class="title_common">基本故障</div>
					<div class="LCBContentul">
						<ul style="width: 90%" class="fourth_line_block_2_ul">
							<li v-for="(item, index) in baseInfoList" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'GZactive':'']">
								{{ item.name == 'placeholder'?'':item.name  }}
							</li>
						</ul>
					</div>
				</div>
			</el-col>
			<el-col :span="10" class="fourth_line_block">
				<div class="bg2 fourth_line_block_3">
					<div class="title_common">其他故障信息</div>
					<div class="LCBContentul">
						<ul style="width: 90%;" class="fourth_line_block_3_ul">
							<li v-for="(item, index) in OtherFaultInfo" :class="[item.name=='placeholder'?'placeholder':'',item.status === 1?'GZactive':'']">
								{{ item.name == 'placeholder'?'':item.name }}
							</li>
						</ul>
					</div>
				</div>
			</el-col>
		</el-row>
		
		<div class="tipContent" v-if="tipStatus">
			<div class="tipsTxt">
				<div class="merquee">
					<span class="merquee-txt">{{ msg }}</span>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import utils from "@/utils/utils";
import Cookies from "js-cookie";
import { getOrder } from "@/utils";
export default {
	inject: ["reload"],
	data() {
		return {
			normalStatus: false, //普通门的信息
			duanmenStatus: false, //端门信息
			yjStatus: false, //应急门信息
			type: Cookies.get("type"), //typeCookies.get('type')
			dataForm: {
				stationSide: "",
				stationName: "",
				DCU: "",
			},
			options: utils.StationList,
			DCUoptions: [], //DCU的options
			dmOptions: [], //单门的options
			yjOptions: [], //应急门的options
			parameterForm: {
				leftDJDL: "",
				rightDJDL: "",
				hzdy: "", //控制电压
				leftMJZL: "",
				rightMJZL: "",
				qddy: "", //驱动电压
				// leftSpeed:'',
				// rightSpeed:'',
				leftMWZ: "", //左侧门位置
				rightMWZ: "", //右侧门位置
				cumulativeBlockTimes: '', //上电累计遇阻次数
			},
			PSCStatus: true,
			doorSList: utils.doorSList,
			pscCmdInfo:utils.pscCmdInfo,
			DCUWorkMode:utils.DCUWorkMode,
			GroupInfo:utils.GroupInfo,
			baseInfoList: utils.baseInfoList,
			DoorTest:utils.DoorTest,
			ElectromagneticLock:utils.ElectromagneticLock,
			LCBList: utils.LCBList,
			txList: utils.txList,
			yjDoorInfo: utils.yjDoorInfo,
			OtherFaultInfo:utils.OtherFaultInfo,
			leftDCT: -1, //左电磁锁
			rightDCT: -1, //右电磁锁
			leftDJ: -1, //电机过载
			rightDJ: -1, //电机过载
			leftDJHE: -1, //电机霍尔
			rightDJHE: -1, //右电机霍尔
			dmStatus: -1, //端门的开关状态
			yjKGStatus: -1,
			yjKGStatus1: -1,
			LEARN_FAULT: -1,
			OPEN_FAULT: -1,
			CLOSE_FAULT: -1,
			unlockingStroke1: -1, //关闭1行程开关状态
			unlockingStroke2: -1, //关闭2行程开关状态
			unlockingStroke3: -1, //关闭3行程开关状态半高
			unlockingStroke4: -1, //关闭4行程开关状态半高
			lockingStroke1: -1, //闭锁行程开关1状态
			lockingStroke2: -1, //闭锁行程开关2状态
			lockingStroke3: -1, //闭锁行程开关3状态
			lockingStroke4: -1, //闭锁行程开关4状态
			openDoorMarshalling4: -1, //PSC开门命令4编组状态
			openDoorMarshalling8: -1, //PSC开门命令8编组状态
			pscCloseDoor: -1, //psc关门命令状态
			openDoorInPlace: -1, //开门到位状态
			openDoorNotInPlace: -1, //开门未到位状态
			closeDoorInPlace1: -1, //关门到位开关1状态
			closeDoorInPlace2: -1, //关门到位开关2状态
			doorReferenceResources: -1, //门参考零位置点丢失状态
			motorDriverTempStatus: -1, //电机驱动器温度异常
			tipStatus: false, //psc显示
			msg: "",
			yjmplStatus: -1, //应急门旁路状态
			activeIndex: "", //滑动门的active
			activeIndex1: "", //应急门的active
			dm1: -1, //端门的状态
			pfStatus: "", //排风阀状态
			fxdStatus: "", //缝隙带状态
			applicateStatusCode: '', //应用状态代码
			// downCode1: '', //宕机代码
			// downCode2: '', //宕机代码
			// microCycle:'',
			isHaveEmergencyDoor: '', //有无应急门
			isDCUGZ: false,
			doorStatus:{},
			doorType:0,
			dcuStatus:{}
		};
	},
	mounted() {
		window.addEventListener('onmessageWS', this.getSocketData)
		window.addEventListener('onmessageWSDCU', this.getSocketDataDCU)
	},
	destroyed() {
		window.removeEventListener('onmessageWS', this.getSocketData)
		window.removeEventListener('onmessageWSDCU', this.getSocketDataDCU)
	},
	created() {
		this.dataForm.stationName = this.$route.query.stationN;
		this.dataForm.stationSide = Number(this.$route.query.stationDe);
		this.dataForm.DCU = this.$route.query.doorDcu;
		this.doorType = this.$route.query.doorType
		if (this.$route.query.doorType == 1 || this.$route.query.doorType == 3) {
			//滑动门
			this.normalStatus = true;
		} else if (this.$route.query.doorType == 2) {
			//应急门
			this.yjStatus = true;
		} else if (this.$route.query.doorType == 0) {
			//端门
			this.duanmenStatus = true;
		}
		this.init();
	},
	methods: {
		//获取系统的初始状态值
		init() {
			//获取线路和站点
			var p0 = new Promise((resolve, reject) => {
				this.getdoorList(() => {
					resolve();
				});
			});
			p0.then(() => {
				this.handleMsg();
				this.handleMsgDCU();
				this.getData(this.returnCSObj()); //清空数据
				this.DCUoptions.forEach((item, index) => {
					if (item.dcu == this.dataForm.DCU) {
						this.activeIndex = index; //当前选中的DCUIndex
					}
				});
				this.yjOptions.forEach((item, index) => {
					if (item.dcu == this.dataForm.DCU) {
						this.activeIndex1 = index; //当前选中的应急门的index
					}
				});
			});
		},
		getSocketData(res) {
			if (res.detail.data) {
				this.handleMsg()
			}
		},
		getSocketDataDCU(res) {
			if (res.detail.data) {
				this.handleMsgDCU()
			}
		},
		//修改端头门信息
		changedm() {
			// this.getDCUCS();
		},
		// 修改DCU编号
		changeDCU() {
			this.DCUoptions.forEach((item, index) => {
				if (this.dataForm.DCU == item.dcu) {
					this.doorType = item.doorType
					this.activeIndex = index;
					this.doorStatus.statusZ = null
				}
			});
			this.getData(this.returnCSObj()); //应该是切换门的时候清空一下数据
		},
		//修改应急门的编号
		changeyjDCU() {
			this.yjOptions.forEach((item, index) => {
				if (item.dcu == this.dataForm.DCU) {
					this.activeIndex1 = index; //当前选中的应急门的index
				}
			});
		},
		//改变站台测的上下行
		changeStation() {
			this.dataForm.DCU = "";
			this.getdoorList();
		},
		//接收websocket数据
		handleMsg() {
			this.$globalWebSocket.ws.send("psc");
			this.$globalWebSocket.ws.onmessage = this.getMessagePSC;
		},
		handleMsgDCU() {
			this.$globalWebSocket.ws1.send("DCU");
			this.$globalWebSocket.ws1.onmessage = this.getMessage;
		},
		getMessagePSC(e) {
			var message = JSON.parse(e.data);
			if (message.taskStatus == 3) {
				//都断开A B 同时宕机
				this.tipStatus = true;
				this.msg = "PEDC命令断开,正在重新连接";

			} else {
				//正常的数据
				this.tipStatus = false;
			}
			// 滑动门
			// 上行滑动门
			if (this.dataForm.stationSide == 1) {
				this.getdoorData(
					message.upLink.sysAsd,
					message.upLink.sysPscCenterControlPanel,
					message.upLink.sysEed,
					message.upLink.sysMsd,
					message.dcuMap
				);
			} else {
				this.getdoorData(
					message.downLink.sysAsd,
					message.downLink.sysPscCenterControlPanel,
					message.downLink.sysEed,
					message.downLink.sysMsd,
					message.dcuMap
				);
			}
		},

		GetStatusZ(statuslist){
			var key = [2, 1, 3, 9, 8, 4, 5, 6, 7, -1, -1]
			var max = -2
			var statusZ = null
			statuslist.forEach((item,index)=>{
				if(item == 1){
					if(key[index] > max){
						max = key[index]
						statusZ = index
					}
				}
			})
			return statusZ
		},

		GetStatusG(statuslist){
			return statuslist.some((item)=>{
				return item == 1
			})
		},

		GetDoorStatus(sysAsd,sysEed,sysMsd,dcuMap){
			// sysAsd.LCB6MarshallInfo = "00000000000000000000000000000000000000000"
			// sysAsd.LCB8MarshallInfo = "10000000000000000000000000000000000000000"
			// sysAsd.asdOpen = "0011110000000000000000000000000000000000000000000000000000000000"
			// sysAsd.asdClosed = "0111110000000000000000000000000000000000000000000000000000000000"
			// sysAsd.asdLcbSeparate = "0111110000000000000000000000000000000000000000000000000000000000"
			// sysAsd.asdClosing = "0111110000000000000000000000000000000000000000000000000000000000"
			// sysAsd.asdOpening = "0111110000000000000000000000000000000000000000000000000000000000"
			// sysAsd.asdOpenBlock = "0111110000000000000000000000000000000000000000000000000000000000"
			// sysAsd.asdCloseBlock = "1111110000000000000000000000000000000000000000000000000000000000"
			//状态
			var lCB6MarshallInfo = Number(sysAsd.LCB6MarshallInfo.split("")[this.activeIndex])
			var lCB8MarshallInfo = Number(sysAsd.LCB8MarshallInfo.split("")[this.activeIndex])
			var asdOpen = Number(sysAsd.asdOpen.split("")[this.activeIndex])
			var asdClosed = Number(sysAsd.asdClosed.split("")[this.activeIndex])
			var asdCloseLocked = Number(sysAsd.asdCloseLocked.split("")[this.activeIndex])
			var asdManualUnlock = Number(sysAsd.asdManualUnlock.split("")[this.activeIndex])
			var asdLcbSeparate = Number(sysAsd.asdLcbSeparate.split("")[this.activeIndex])
			var asdClosing = Number(sysAsd.asdClosing.split("")[this.activeIndex])
			var asdOpening = Number(sysAsd.asdOpening.split("")[this.activeIndex])
			var asdOpenBlock = Number(sysAsd.asdOpenBlock.split("")[this.activeIndex])
			var asdCloseBlock = Number(sysAsd.asdCloseBlock.split("")[this.activeIndex])

			//故障
			var asdOpenFaultAlarm = Number(sysAsd.asdOpenFaultAlarm.split("")[this.activeIndex])
			var asdCloseFaultAlarm = Number(sysAsd.asdCloseFaultAlarm.split("")[this.activeIndex])
			var leftElecLockFault = this.dcuStatus.leftElecLockFault
			var rightElecLockFault = this.dcuStatus.rightElecLockFault
			var motorDriverTempStatus = this.dcuStatus.motorDriverTempStatus
			var cpu0Fault = this.dcuStatus.cpu0 == 1?1:0
			var cpu1Fault = this.dcuStatus.cpu1 == 1?1:0
			var isADownFault = this.dcuStatus.isADown == 2?1:0
			var isBDownFault= this.dcuStatus.isBDown == 2?1:0
			var downCodeFault = this.dcuStatus.downCode >0 ?1: 0
			var asdTrainFaultSeparateStation = Number(sysAsd.asdTrainFaultSeparateStation.split("")[this.activeIndex])
			var asdStationFaultSeparateTrain = Number(sysAsd.asdStationFaultSeparateTrain.split("")[this.activeIndex])

			var status = 0
			var _doorstatus = {}
			
			if(this.doorType == 1 || this.doorType == 3){
				_doorstatus = {
					asdOpenBlock,
					asdCloseBlock,
					"statusZ":this.GetStatusZ([
						asdOpen,asdClosed,asdCloseLocked,asdManualUnlock,asdLcbSeparate,asdClosing,
						asdOpening,asdOpenBlock,asdCloseBlock
					]),
					"statusG":this.GetStatusG([
						asdOpenBlock,asdCloseBlock,asdOpenFaultAlarm,asdCloseFaultAlarm,leftElecLockFault,
						rightElecLockFault,motorDriverTempStatus,cpu0Fault,cpu1Fault,isADownFault,isBDownFault,
						downCodeFault,asdTrainFaultSeparateStation,asdStationFaultSeparateTrain
					])?1:0,
					status : 1,
					lCB6MarshallInfo,
					lCB8MarshallInfo
				}
			}
			if(this.doorType == 0){
				if(this.$route.query.doorDcu == "端头门"){
					status = sysMsd.endHeadDoor
				}
				if(this.$route.query.doorDcu == "端尾门"){
					status = sysMsd.endTailDoor
				}
				_doorstatus = {
					"statusZ":this.GetStatusZ([
						asdOpen,asdClosed,asdCloseLocked,asdManualUnlock,asdLcbSeparate,asdClosing,
						asdOpening,asdOpenBlock,asdCloseBlock,autoLearningStatus,isHaveEmergencyDoor
					]),
					"statusG":this.GetStatusG([
						asdOpenBlock,asdCloseBlock,asdOpenFaultAlarm,asdCloseFaultAlarm,leftElecLockFault,
						rightElecLockFault,motorDriverTempStatus,cpu0Fault,cpu1Fault,isADownFault,isBDownFault,
						downCodeFault,asdTrainFaultSeparateStation,asdStationFaultSeparateTrain
					])?1:0,
					status,
				}
			}
			if(this.doorType == 2){
				var edata = this.getEnglish(this.activeIndex1 + 1);
				
				_doorstatus = {
					"type":this.$route.query.type,
					"statusZ":this.GetStatusZ([
						asdOpen,asdClosed,asdCloseLocked,asdManualUnlock,asdLcbSeparate,asdClosing,
						asdOpening,asdOpenBlock,asdCloseBlock,autoLearningStatus,isHaveEmergencyDoor
					]),
					"statusG":this.GetStatusG([
						asdOpenBlock,asdCloseBlock,asdOpenFaultAlarm,asdCloseFaultAlarm,leftElecLockFault,
						rightElecLockFault,motorDriverTempStatus,cpu0Fault,cpu1Fault,isADownFault,isBDownFault,
						downCodeFault,asdTrainFaultSeparateStation,asdStationFaultSeparateTrain
					])?1:0,
					"statuslf":sysEed[`${edata}` + "EedLeft"],
					"statusrg":sysEed[`${edata}` + "EedRight"],
					"statusyjmpl":sysEed.emergencyDoorBypassSwitch
				}
			}
			

			this.doorStatus = _doorstatus
		},

		


		// 单门信息的赋值
		getdoorData(data, data1, data2, data3, data4) {
			//dcu有故障了--开关门到位检测和门机状态都只为空
			// if (this.isDCUGZ) {
			// 	this.openDoorInPlace = -1; //开门到位
			// 	this.openDoorNotInPlace = -1; //开门未到位
			// 	this.closeDoorInPlace1 = -1 //关门到位
			// 	var doorStatus = {
			// 		asdOpening: -1, //开门过程中
			// 		asdClosing: -1, //关门过程中
			// 		asdOpen: -1, //门完全打开
			// 		asdLcbSeparate: -1, //隔离状态
			// 		asdCloseLocked: -1, //关闭锁紧
			// 		asdManualUnlock: -1, //手动解锁
			// 		asdOpenBlock: -1, //开门遇阻
			// 		asdCloseBlock: -1, //关门遇阻
			// 		asdTrainFaultSeparateStation: Number(data.asdTrainFaultSeparateStation.split("")[this.activeIndex]),
			// 		asdStationFaultSeparateTrain:Number(data.asdStationFaultSeparateTrain.split("")[this.activeIndex])
			// 		// asdTrainFaultSeparateStation: -1, //对位隔离
			// 		// asdStationFaultSeparateTrain:-1,
			// 	};
			// 	//this.MLinfo(this.doorSList, doorStatus);
			// } else {
			// 	// 开关门到位监测-------关门到位，如果为1则关门到位否则为关门未到位
			// 	var asdOpen = data.asdOpen.split("");
			// 	var asdClose = data.asdClosed.split("");
			// 	this.openDoorInPlace = Number(asdOpen[this.activeIndex]); //开门到位
			// 	this.openDoorNotInPlace = Number(asdOpen[this.activeIndex]); //开门未到位
			// 	this.closeDoorInPlace1 = Number(asdClose[this.activeIndex]) == 1 ? 1 : 0; //关门到位
			// 	// this.closeDoorInPlace2 = Number(asdClose[this.activeIndex])==1?1:0 //关门未到位
			// 	// 门机状态
			// 	var doorStatus = {
			// 		asdOpening: Number(data.asdOpening.split("")[this.activeIndex]), //开门过程中
			// 		asdClosing: Number(data.asdClosing.split("")[this.activeIndex]), //关门过程中
			// 		asdOpen: Number(data.asdOpen.split("")[this.activeIndex]), //门完全打开
			// 		asdLcbSeparate: Number(data.asdLcbSeparate.split("")[this.activeIndex]), //隔离状态
			// 		asdCloseLocked: Number(data.asdCloseLocked.split("")[this.activeIndex]), //关闭锁紧
			// 		asdManualUnlock: Number(
			// 			data.asdManualUnlock.split("")[this.activeIndex]
			// 		), //手动解锁
			// 		asdOpenBlock: Number(data.asdOpenBlock.split("")[this.activeIndex]), //开门遇阻
			// 		asdCloseBlock: Number(data.asdCloseBlock.split("")[this.activeIndex]), //关门遇阻
			// 		asdTrainFaultSeparateStation: Number(data.asdTrainFaultSeparateStation.split("")[this.activeIndex]),
			// 		asdStationFaultSeparateTrain:Number(data.asdStationFaultSeparateTrain.split("")[this.activeIndex])
			// 	};
			// 	//this.MLinfo(this.doorSList, doorStatus);
			// }
			this.GetDoorStatus(data,data2,data3,data4)
			
			// 接收到的开关门命令
			// this.openDoorMarshalling4 = data1.open4ADoorCmd; // PSC开门4编组命令
			// this.openDoorMarshalling8 = data1.open8ADoorCmd; // PSC开门8编组命令
			// this.pscCloseDoor = data1.closeDoorCmd; // PSC关门命令


			//通讯故障
		
			//应急门的旁路开关
			// this.yjmplStatus = Number(
			// 	data2.emergencyDoorBypassSwitch.split("")[this.activeIndex1]
			// );
			//应急门的锁闭和未锁闭的状态
			// var edata = this.getEnglish(this.activeIndex1 + 1);
			// this.yjKGStatus = data2[`${edata}` + "EedLeft"];
			// this.yjKGStatus1 = data2[`${edata}` + "EedRight"];
			// //端头门的状态值和行程开关
			// if (this.dataForm.stationSide == 1) {
			// 	//上行数据
			// 	if (this.dataForm.DCU == "端头门") {
			// 		this.dm1 = data3.endHeadDoor;
			// 		this.dmStatus = data3.endHeadDoorOpenTimeoutNotCloseAlarm;
			// 	} else {
			// 		this.dm1 = data3.endTailDoor;
			// 		this.dmStatus = data3.endTailDoorOpenTimeoutNotCloseAlarm;
			// 	}
			// } else {
			// 	//下行数据
			// 	if (this.dataForm.DCU == "端头门") {
			// 		this.dm1 = data3.endHeadDoor;
			// 		this.dmStatus = data3.endHeadDoorOpenTimeoutNotCloseAlarm;
			// 	} else {
			// 		this.dm1 = data3.endTailDoor;
			// 		this.dmStatus = data3.endTailDoorOpenTimeoutNotCloseAlarm;
			// 	}
			// }
		},
		// 中文换算
		getEnglish(n) {
			switch (n) {
				case 1:
					return "one";
					break;
				case 2:
					return "two";
					break;
				case 3:
					return "three";
					break;
				case 4:
					return "four";
					break;
				case 5:
					return "five";
					break;
				case 6:
					return "six";
					break;
				case 7:
					return "seven";
					break;
				case 8:
					return "eight";
					break;
				default:
				// 与 case 1 和 case 2 不同时执行的代码
			}
		},
		//根据数组回显命令的信息的状态
		MLinfo(Arr, ObjArr) {
			Arr.forEach((item) => {
				Object.keys(ObjArr).forEach((val) => {
					if (item.FName === val) {
						item.status = ObjArr[val];
					}
				});
			});
		},
		//获取websocket数据
		getMessage(e) {
			var message = JSON.parse(e.data);
			var doorID = this.activeIndex + 1;
			if (message.dcuId <= 127 && this.dataForm.stationSide == 1) {
				// 上行数据
				if (doorID == message.dcuId) {
					this.getData(message.dcuHeartBeatOne);
				}
			}
			if (message.dcuId >= 128 && this.dataForm.stationSide == 0) {
				// 下行数据
				var num = message.dcuId - 128;
				if (doorID == num) {
					this.getData(message.dcuHeartBeatOne);
				}
			}

		},
		//根据数组回显命令的信息的状态
		MLinfo(Arr, ObjArr) {
			Arr.forEach((item) => {
				Object.keys(ObjArr).forEach((val) => {
					if (item.FName === val) {
						item.status = ObjArr[val];
					}
				});
			});
		},

		//获取单门的列表
		getdoorList(callback) {
			this.DCUoptions = [];
			this.dmOptions = [];
			this.$http.get("/psc/door/getDoor").then((res) => {
				if (this.dataForm.stationSide == 1) {
					res.data.data.up.forEach((item) => {
						if (item.doorType == 1 || item.doorType == 3) {
							this.DCUoptions.push(item);
						} else if (item.doorType == 0) {
							this.dmOptions.push(item);
						} else if (item.doorType == 2) {
							this.yjOptions.push(item);
						}
					});
					if (callback) {
						callback();
					}
					if(getOrder(res.data.data.up)==1){
						this.DCUoptions.reverse();
						this.dmOptions.reverse();
						this.yjOptions.reverse();
					}
				} else {
					res.data.data.down.forEach((item) => {
						if (item.doorType == 1 || item.doorType == 3) {
							this.DCUoptions.push(item);
						} else if (item.doorType == 0) {
							this.dmOptions.push(item);
						} else if (item.doorType == 2) {
							this.yjOptions.push(item);
						}
					});
					if (callback) {
						callback();
					}
					if(getOrder(res.data.data.down)==1){
						this.DCUoptions.reverse();
						this.dmOptions.reverse();
						this.yjOptions.reverse();
					}
					
				}
			});
		},
		//获取DCU初始值
		getDCUCS(callback) {
			// this.dataForm.DCU
			this.$http
				.get("/psc/dcu/readCurrentDcu", {
					params: {
						dcu: this.dataForm.DCU,
						doorType: this.$route.query.doorType,
						stationSide: this.dataForm.stationSide,
					},
				})
				.then((res) => {
					if (res.data.code == 0 && res.data.data !== null) {
						if (this.dataForm.DCU == res.data.data.sysDcuState.dcu) {
							this.getData(
								res.data.data.sysDcuState,
								res.data.data.dcuParametersDTO
							);
						}
						if (callback) {
							callback();
						}
					}
				});
		},
		getData(data) {

			this.doorSList.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.pscCmdInfo.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.LCBList.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.DCUWorkMode.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.GroupInfo.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.DoorTest.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.ElectromagneticLock.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.yjDoorInfo.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.txList.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});	
			this.baseInfoList.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
			this.OtherFaultInfo.forEach((item) => {
				//data[item.FName] = 1
				item.status = data[item.FName] == 1 ? 1 : 0;
			});
		},
		//返回初始值
		returnCSObj() {
			var obj = {
				leftCurrent: '',
				rightCurrent: '',
				dc24Voltage: -1,
				leftNowel: '',
				rightNowel: '',
				dc110Voltage: '',
				doorPosition: '',
				leftElecLockFault: '',
				rightElecLockFault: '',
				leftMotorOverCurrentFault: '',
				rightMotorOverCurrentFault: '',
				refZero: '',
				autoLearningStatus: '',
				openDoorSigFault: '',
				closeDoorSigFault: '',
				autoLearningStatus: '',
				exhaustStatus: '',
				slipLightStripStatus: '',
				isADown: '',
				isBDown: '',
				motorDriverTempStatus: 0,
			}
			this.parameterForm.leftMWZ = ''
			return obj
		},

	},
};
</script>

<style scoped>
.bg {
	background-color: #fff;
	border-radius: 10px;
	/* height: 7.6vh; */
	/* line-height: 7.6vh; */
	/* padding: 0 1.8vw; */
}
.bg2{
	border-radius: 10px;
	border: 1px solid rgb(42,130,228);
}

.bg>>>.el-form--inline .el-form-item__content,
.el-form--inline .el-form-item {
	vertical-align: middle !important;
}

.bg>>>.el-form-item {
	margin-bottom: 0;
}
.select_style{
	width: 5vw !important;
	min-width: 70px;
	font-size: 14px !important;
}

/* .bg>>> .el-select,.bg>>> .el-input__inner{
		height: 30px!important;
	} */

.first_line_image{
	padding-top: 20px;
}

.first_line_form{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
}

.first_line_block{
	height: 35vh;
	min-height: 350px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
}
.second_line_block{
	height: 23vh;
	min-height: 230px;
}
.third_line_block{
	height: 13vh;
	min-height: 130px;
}
.fourth_line_block{
	height: 25vh;
	min-height: 250px;
}

.first_line_block_1,.first_line_block_2,.first_line_block_3,.first_line_block_4,.first_line_block_5{
	height: 100%;
}
.first_line_block_righttop{
	height:50%;
	width:100%;
	display: flex;
	margin-left:0.5%
}
.first_line_block_rightbtm{
	margin-top:0.5%;
	margin-left:0.5%;
	display: flex;
	height:47.5%;
	width: 100%;
}
.first_line_block_1{
	width:64%
}
.title_common{
	width:100%;
	height:50px;
	line-height: 50px;
	text-align: center;
	color:rgb(42,130,228);
	font-size: 14px;
	font-weight: 600;
}
.second_line_block_1,.second_line_block_3,.third_line_block_1,.third_line_block_3{
	margin-left:10px;
	margin-right:10px;
	height: 85%;
}
.fourth_line_block_1,.fourth_line_block_3{
	margin-left:10px;
	margin-right:10px;
	height: 90%;
}
.second_line_block_2,.third_line_block_2{
	height: 85%;
}
.fourth_line_block_2{
	height: 90%;
}
.third_line_block_4{
	height: 85%;
	margin-right: 10px;
}
.first_line_block_2{
	width:36%;
	margin-left:10px
}
.first_line_block_3,.first_line_block_4{
	width:35%;
	margin-right:10px
}
.first_line_block_5{
	width:30%;
}
.LCBContent {
	height: 25.3vh;
	min-height: 200px;
	background-color: #fff;
	border-radius: 10px;
	padding: 1.34vh 1.875vw;
	margin-right: 10px;
}

.LCBContent1 {
	padding: 1.34vh 0;
}

.LCBContentTxt {
	font-size: 18px;
	font-weight: 700;
	color: rgba(42, 130, 228, 1);
	text-align: center;
	margin: 0;
}

.LCBContentul {
	display: flex;
	height: calc(100% - 50px);
	justify-content: center;
}

.LCBContentul ul {
	list-style: none;
	display: flex;
	height: 100%;
	padding: 0;
	margin: 0;
	align-items: center;
	flex-wrap: wrap;
}

.LCBContentul ul li {
	position: relative;
	padding-left: 2vw;
	font-size: 14px;
	font-weight: 400;
	color: rgba(0, 0, 0, 1);
	height: 30px;
}
.LCBContentul .first_line_block_1_ul li{
	width: 25%;
}

.LCBContentul .first_line_block_2_ul li{
	width: 50%;
}
.LCBContentul .first_line_block_3_ul li{
	width: 50%;
}

.LCBContentul .first_line_block_4_ul li{
	width: 50%;
}

.LCBContentul .first_line_block_5_ul li{
	width: 50%;
}

.second_line_block_2_ul li,.fourth_line_block_2_ul li{
	width: 25%;
}
.second_line_block_3_ul li{
	width:50%;
}
.fourth_line_block_3_ul li{
	width: 25%;
}



.LCBContentul ul li:not(.placeholder)::before {
	content: "";
	width: 1vw;
	height: 1vw;
	/* background: rgba(9, 216, 145, 1)!important; */
	background: rgba(166, 166, 166, 1);
	border-radius: 100px;
	position: absolute;
	left: 0;
	top: 2px;
}

.PSCContent {
	display: flex;
	flex-direction: column;
	height: calc(100% - 23px);
}

.PSCContent1,
.PSCContent2 {
	width: 94%;
	height: 56%;
	margin-top: 4%;
	margin-left: 3%;
	display: flex;
	align-items: center;
	padding: 0 1.875vw;
	justify-content: space-between;
	/* border-bottom:1px dashed #c0c1c1; */
	background-color: rgba(0, 123, 255, 0.1);
	border-radius: 10px;
}

.PSCContent2 {
	width: 94%;
	height: 40%;
	border-bottom: none;
}

.PSCContent1Txt {
	font-size: 16px;
	font-weight: 400;
	color: rgba(28, 134, 255, 1);
}

.PSCContent1Txt1,
.PSCContent11 {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-around;
	font-size: 16px;
	font-weight: 400;
	color: rgba(0, 0, 0, 1);
}
.PSCContent1Txt11{
	width: 80px;
}
.PSCContent1Txt11 div:before{
	top:0!important;
}
.PSCContent1Txt11 div{
	display: flex;
	/* height: 40px; */
	justify-content: center;
	align-items: center;
}

.PSCContent1Txt1 div,
.PSCContent11 div {
	position: relative;
	padding-left: 2vw;
}

.PSCContent11 div {
	padding-left: 0vw;
}

.PSCContent1Txt1 div:before {
	content: "";
	width: 1vw;
	height: 1vw;
	border-radius: 100px;
	background: rgba(166, 166, 166, 1);
	position: absolute;
	left: 0;
	top: 2px;
}

.PSCContent1Txt2 div:before {
	top: -10px;
}

.PSCShow:before {
	background-image: radial-gradient(#fff, #09d891, #09d891) !important;
	/* background: rgba(9, 216, 145, 1)!important; */
}

.PSCNoShow:before {
	background: rgba(166, 166, 166, 1);
}

.pscTxt2 {
	font-size: 16px;
	font-weight: 400;
	color: rgba(28, 134, 255, 1);
	padding-right: 1vw;
}

.PSCContent11B {
	position: relative;
	padding-left: 2vw;
}

.PSCContent11B:before {
	content: "";
	width: 1vw;
	height: 1vw;
	border-radius: 100px;
	background: rgba(166, 166, 166, 1);
	position: absolute;
	left: 0;
	top: 2px;
}

.doorS ul {
	flex-direction: initial;
	flex-wrap: wrap;
}

.doorS ul li {
	width: 50%;
}

.doorS ul li:first-child:before {
	left: 28%;
}

.xcStatus {
	height: 25vh;
	min-height: 200px;
	background-color: #fff;
	display: flex;
	align-items: center;
	padding: 2.1vh 1.5vw;
	/* justify-content: space-between; */
	margin-right: 10px;
	border-radius: 10px;
}

.homeTuTxt {
	width: 16px;
	font-size: 18px;
	font-weight: 700;
	word-wrap: break-word;
	word-break: normal;
	color: rgba(42, 130, 228, 1);
	display: flex;
	align-items: center;
}

.xcStatusTxt {
	font-size: 16px;
	font-weight: 500;
	color: rgba(42, 130, 228, 1);
}

.xcStatusJs {
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	margin-left: 10%;
	width: 100%;
}

.xcStatusTxt1 {
	display: flex;
	align-items: center;
	justify-content: center;
	height: calc(100% - 23px);
	position: relative;
	font-size: 16px;
}

.xcStatusTxt1:before {
	content: "";
	width: 1vw;
	height: 1vw;
	border-radius: 100px;
	background: rgba(166, 166, 166, 1);
	position: absolute;
	left: -2vw;
}

.baseInfo {
	height: 25vh;
	background-color: #fff;
	padding: 2.1vh 1.5vw;
	justify-content: space-between;
	margin-right: 10px;
}

.baseInfoS ul li:nth-child(2n) {
	width: 50%;
}

.baseInfoS ul li:nth-child(2n + 1) {
	width: 50%;
}

.baseInfoS ul li:first-child {
	width: 100%;
	justify-content: center;
	align-items: center;
	text-align: center;
	opacity: 0;
}


.baseInfoS ul li:nth-child(6) {
	width: 50%;
}

.baseInfoS ul li:last-child {
	width: 50% !important;
	justify-content: flex-start;
	text-align: left;
}

.parameterInfo {
	height: 30vh;
	min-height: 249px;
}

.parameterInfo>>>.el-input__inner {
	height: 100% !important;
}

.parameterInfo>>>.el-form-item {
	margin-bottom: 0;
	font-size: 14px;
	font-weight: 400;
	color: rgba(46, 48, 51, 1);
}

.danwei {
	font-size: 16px;
	font-weight: 400;
	color: rgba(0, 0, 0, 1);
}

.parameterContent {
	height: calc(100% - 23px);
}

.parameterContent .el-form {
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	height: 100%;
}

.parameterContent .el-row {
	display: flex;
	align-items: center;
}

.parameterContent>>>.el-form-item__label {
	font-size: 16px !important;
}

.parameterContent1 {
	display: block;
	/* width:8.5vw; */
	width: 120px;
	font-size: 16px;
}

.duanmenBg {
	background-color: transparent !important;
	padding: 0;
}

.duanmenBg1 {
	background: #fff !important;
	padding: 0 1.8vw;
	border-radius: 10px;
	margin-right: 10px;
}

.duanmenCon {
	display: flex;
	height: 100%;
	align-items: center;
	justify-content: space-between;
}

.duanmenCon1 {
	/* width: 16px; */
	font-size: 14px;
	font-weight: 700;
	word-wrap: break-word;
	word-break: normal;
	line-height: 15px;
	color: rgba(42, 130, 228, 1);
}

.duanmenCon2 {
	/* padding-left: 4.2vw; */
	font-size: 16px;
	font-weight: 400;
	color: rgba(0, 0, 0, 1);
	position: relative;
	display: flex;
	align-items: center;
}

.duanmenCon2:before {
	content: "";
	width: 1vw;
	height: 1vw;
	border-radius: 100px;
	background: rgba(166, 166, 166, 1);
	position: absolute;
	left: -1.3vw;
	/* top: 26px; */
	/* top: 29px; */
}

.green:before {
	background-image: radial-gradient(#fff, #09d891, #09d891) !important;
	/* background: rgba(9, 216, 145, 1); */
}

.red:before {
	/* background: rgba(212, 48, 48, 1) */
	background-image: radial-gradient(#fff,
			rgba(212, 48, 48, 1),
			rgba(212, 48, 48, 1)) !important;
}

.duanmenCon21:before {
	left: -1.6vw;
}

.yjTxt {
	font-size: 16px;
	font-weight: 400;
	color: rgba(255, 141, 26, 1);
	/* margin-left: 2.2vw; */
}

.GZactive:before {
	background-image: radial-gradient(#fff,
			rgba(212, 48, 48, 1),
			rgba(212, 48, 48, 1)) !important;
	/* background: rgba(212, 48, 48, 1) !important; */
}

.tipContent {
	position: fixed;
	top: 0px;
	height: 50px;
	line-height: 50px;
	z-index: 999999;
	width: 50%;
	margin-left: 20%;
	text-align: center;
}

.tipsTxt {
	color: red;
	font-weight: 600;
	font-size: 20px;
	width: 250px;
	margin: 0 auto;
}

.tipsTxt>>>.marquee-wrap,
.tipsTxt>>>.scroll {
	height: 50px;
}

.tipsTxt>>>.marquee,
.tipsTxt>>>.copy {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.tipsTxt>>>.getWidth {
	margin: 0 !important;
}

.xcContent {
	display: flex;
	height: 100%;
	align-items: center;
	flex-direction: column;
	width: 100%;
}

.xcContent1 {
	display: flex;
	height: 100%;
	align-items: center;
	background-color: rgba(0, 123, 255, 0.1);
	border-radius: 10px;
	margin-bottom: 5px;
	/* margin-top: 10px; */
	padding: 5px 2vw;
	width: 100%;
	justify-content: center;
}

.xcContent>>>.xcContent1:last-child {
	margin-bottom: 0 !important;
}

.right2 {
	padding-right: 2vw;
}

.LCBContentulG ul li:first-child:before {
	left: 35%;
}

.PSCContent11B:before {
	top: 0px !important;
}

/* 文字滚动 */
.merquee {
	height: 50px;
	line-height: 50px;
	box-sizing: border-box;
	word-break: break-all;
	white-space: nowrap;
	overflow: hidden;
}

.merquee-txt {
	display: inline-block;
	padding-left: 100%;
	/* 从右至左开始滚动 */
	animation: marqueeTransform 16s linear infinite;
}

/* 三种状态值 */
.pfContent {
	width: 100px;
	height: 30px;
	background-color: #d3d3d3;
	border-radius: 50px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	/* padding-right: 6px; */
}

.pfOpen {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 14px;
}

.pfgreen {
	background-color: #09d891;
}

.pfclose {
	background-color: rgba(166, 166, 166, 1);
}

.pfgz {
	background-color: rgba(212, 48, 48, 1);
}

.inputWidth {
	width: 7.8vw;
	height: 3.5vh;
	min-width: 100px;
}

.doorSNew ul li {
	width: 40% !important;
	margin-left: 10% !important;
}

.doorSNew1 ul {
	align-items: flex-start;
}

.doorSNew1 ul li:first-child {
	width: 100% !important;
}

.doorSNew1 ul li,
.doorSNew1 ul li:nth-child(7) {
	width: 40% !important;
	margin-left: 10% !important;
}

.doorSNew1 ul li:nth-child(7) {
	white-space: nowrap;
}

.baseInfoS ul li:last-child {
	width: 100% !important;
}
.PSCContent3{
	width: 100%;
	display:flex ;
	justify-content: space-between;
	align-items:center ;
}

@keyframes marqueeTransform {
	0% {
		transform: translate(0, 0);
	}

	100% {
		transform: translate(-100%, 0);
	}
}

@media screen and (min-width: 1920px) {

	/* .baseInfoS ul li:last-child:before,.baseInfoS ul li:nth-child(6):before{
			    left: 30%;
				
		} */
	/* .doorS ul li:first-child:before{
			 left: 36%;
		} */
	.LCBContentulG ul li:first-child:before {
		left: 38%;
	}

	.LCBContentul ul li:before {
		top: -5px !important;
	}

	.baseInfoS ul li:nth-child(2n) {
		width: 50%;
		text-align: left;
	}

	.baseInfoS ul li:nth-child(2n + 1) {
		width: 50%;
		text-align: left;
	}

	.baseInfoS ul li:first-child {
		width: 100%;
		text-align: center;
		opacity: 0;
	}

	.baseInfoS ul li:last-child:before,
	.baseInfoS ul li:nth-child(6):before {
		left: 0;
	}
}

@media screen and (max-width: 1440px) {
	.inputWidth {
		width: 5.8vw;
		height: 3.5vh;
	}
}
</style>
